Rule Manager
Learn how to create dynamic logic in forms and flows using the Rule Manager in Synergy IDE. This document explains Condition and Then blocks, execution timing, and rule behavior with examples.
Overview
The Rule Manager allows users to define dynamic behaviors in forms or flows using conditional logic. These rules help you manage visibility, value assignment, enable/disable states, and more based on user input or system triggers.
Each rule is structured in two parts:
Condition: Defines when the rule should be triggered.Then: Defines what should happen if the condition is met.
Additional logical branching is possible using AND, OR, and ELSE blocks.
Accessing the Rule Manager
To access the Rule Manager:
- Go to the top menu and click
View. - Select
Rule Manager.
If no rules exist, a message is shown to help you create a new one.
Creating a New Rule
Click the + New Rule button to open the rule design screen.
A rule consists of:
- One or more
Condition blocks(IF, AND, OR, ELSE) - One or more
Thenactions - Optionally,
Elseactions - Rule
execution timing(OnChange, OnLoad, or Manual) - A custom name and description (recommended)
Condition Block
The Condition block defines logical criteria that must be met for the rule to activate.
Condition Types
IF: Main conditionAND: Adds strict conditionOR: Adds alternative pathsELSE: Executes when other conditions are not met
Supported Components
| Component | Property | Example Condition |
|---|---|---|
| TextBox | .value | TextBox1.value == 'Admin' |
| NumberBox | .value | NumberBox1.value > 100 |
| CheckBox | .value | CheckBox1.value == true |
| ComboBox | .value | ComboBox1.value != 'Active' |
| DatePicker | .value | DatePicker1.value < Today() |
Then Block
The Then block defines the actions that will be executed when the conditions are satisfied.
Supported Action Types
| Action Type | Description |
|---|---|
| Assign Value | Set a value to a component (e.g., TextBox.value) |
| Show / Hide Component | Toggle the visibility of UI elements |
| Enable / Disable | Make inputs interactive or inactive |
| Clear Field | Remove existing data from input |
| Trigger Validation | Force a validation check |
| Show Message | Display an info message |
| Validation Error | Block submission and show error |
Action Examples
Example
IF CheckBox1.value == true
THEN
TextBox1.visible = trueTextBox1.value = "Checked"NumberBox1.disabled = false
Use + Add Action to add multiple actions to the same Then block.
ELSE Block
The ELSE block is used to define fallback actions when the IF condition is not satisfied.
Example with ELSE
IF NumberBox1.value > 100
THEN
TextBox2.value = "Limit Exceeded"
ELSE
TextBox2.value = ""
This ensures robust logic even for empty or invalid inputs.
Execution Timing
Rules can be executed based on different events. You can choose the timing at the bottom of the rule editor.
Available Timing Options
| Timing Type | Description |
|---|---|
| OnChange | Executes when the input value changes |
| OnLoad | Executes when the form is opened |
| Manual | Executes via script or system event |
Nested Logic Example
You can chain multiple conditions and actions using nested logic:
IF ComboBox1.value == "Manager"
AND CheckBox1.value == true
THEN
TextBox1.visible = trueNumberBox1.disabled = false
ELSE
TextBox1.visible = false
Visual Example
IF NumberBox1.value > 50
THEN
TextBox1.visible = trueTextBox1.value = "Limit Exceeded"
ELSE
TextBox1.visible = false
This behavior is configured using the visual Rule Editor.
Best Practices
Use descriptive rule names (e.g., Show Approval Button for Manager)
Use ELSE blocks for fail-safe behavior
Avoid circular logic where the same field is both trigger and target
Group related conditions to improve readability
Example 1: Show/Hide with CheckBox
IF NumberBox1.value == 50
THEN
TextBox2.visible = CheckBox1.value
Use case: Show or hide a field based on checkbox state.
Example 2: Assign Static Value on Condition
IF NumberBox1.value > 100
THEN
TextBox2.value = "Limit Exceeded"
ELSE
TextBox2.value = ""
Use case: Show a message based on threshold values.
FAQs
- What is the Rule Manager used for?
- What kind of actions can be triggered by a rule?
- How does ELSE work in rules?
- Can I reuse actions across multiple conditions?
- When are rules executed in a form?